An associative memory (AM) classifies test patterns. An AM finds the closest match between a “test pattern” and a set (“codebook”) of “memorized patterns” stored in a memory coupled to the AM. In the case of character recognition, for example, such a test pattern may be a somewhat obscured or fuzzy image of a “1” that is to be compared to more crisp memorized patterns of a “0”, a “1”, and a “2”. A properly functioning AM will match the test pattern “1” with the memorized pattern “1” and avoid matching the test pattern with the memorized patterns “0” or “2”. AM is applicable in many areas including image or speech recognition, biometric recognition, internet and database searching, event (threat) identification, medical diagnostics, and the like.